﻿using DataBaseLib.Entities.BaseEntity;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataBaseLib.Entities
{

    [SugarTable("Student")]//设置数据库名称，当类库名称和数据库不一致是可以通过别名统一
    public class Student:BaseModel
    {
        /// <summary>
        /// 编号
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(100)",ColumnDescription = "编号")]
        public string Code {  get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(100)",ColumnDescription = "姓名")]
        public string Name { get; set; }
        /// <summary>
        /// 年龄
        /// </summary>
        [SugarColumn(ColumnDescription = "年龄")]
        public int Age { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [SugarColumn(ColumnDescription = "性别")]
        public int Gender { get; set; }
        /// <summary>
        /// 课程Id
        /// </summary>
        [SugarColumn(ColumnDescription = "课程Id")]
        public int CourseId { get; set; }
        /// <summary>
        /// 所选课程集合
        /// </summary>
        [SugarColumn(IsIgnore = true,ColumnDescription = "课程集合")]
        public List<Course> CourseList { get; set; }

    }
}
